'use strict';

const Controller = require('egg').Controller;
const fs = require('fs');
const path = require('path');

class DistController extends Controller {
  transform() {
    const { ctx } = this;

    fs.readFile(path.join('/Users/goyoo/huoban/dev/wpn-client/dist', 'index.js'), (err, data) => {
      //设置响应头，解决乱码问题
      // ctx.response.writeHead(200, {'Content-Type': 'text/html;charset=utf-8'});
      ctx.body = data;
    })
  }
}

module.exports = DistController;

